package jl.cts.objects;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;

public class ScoreBar {

	private int x;
	private int y;
	private int width;
	private int height;
	private int score;
	private String text;
	private int backgroundColor = Color.parseColor("#4eba64");
	private int textColor = Color.parseColor("#b5d929");

	public ScoreBar(Context context, int x, int y, int width, int height) {
		this.x = x;
		this.y = y;
		this.width = width;
		this.height = height;
		this.score = 0;
		this.text = "Score: " + score;
	}

	public void render(Canvas canvas, Paint paint) {
		paint.setColor(backgroundColor);
		canvas.drawRect(x, y, width, height, paint);
		paint.setColor(textColor);
		paint.setTextSize(height);
		canvas.drawText(text, x + (int) (0.1 * width),
				y + (int) (height * 0.9), paint);
	}
}
